package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StudyMapper;
import com.ruoyi.system.domain.Study;
import com.ruoyi.system.service.IStudyService;

/**
 * 每日一题Service业务层处理
 * 
 * @author 寒
 * @date 2024-07-05
 */
@Service
public class StudyServiceImpl implements IStudyService 
{
    @Autowired
    private StudyMapper studyMapper;

    /**
     * 查询每日一题
     * 
     * @param id 每日一题主键
     * @return 每日一题
     */
    @Override
    public Study selectStudyById(String id)
    {
        return studyMapper.selectStudyById(id);
    }

    /**
     * 查询每日一题列表
     * 
     * @param study 每日一题
     * @return 每日一题
     */
    @Override
    public List<Study> selectStudyList(Study study)
    {
        return studyMapper.selectStudyList(study);
    }

    /**
     * 新增每日一题
     * 
     * @param study 每日一题
     * @return 结果
     */
    @Override
    public int insertStudy(Study study)
    {
        return studyMapper.insertStudy(study);
    }

    /**
     * 修改每日一题
     * 
     * @param study 每日一题
     * @return 结果
     */
    @Override
    public int updateStudy(Study study)
    {
        return studyMapper.updateStudy(study);
    }

    /**
     * 批量删除每日一题
     * 
     * @param ids 需要删除的每日一题主键
     * @return 结果
     */
    @Override
    public int deleteStudyByIds(String[] ids)
    {
        return studyMapper.deleteStudyByIds(ids);
    }

    /**
     * 删除每日一题信息
     * 
     * @param id 每日一题主键
     * @return 结果
     */
    @Override
    public int deleteStudyById(String id)
    {
        return studyMapper.deleteStudyById(id);
    }
}
